package com.hsyt.pfc.redis;//package com.hsyt.pfc.redis;
//
//import org.springframework.data.redis.connection.RedisConnectionFactory;
//import org.springframework.data.redis.connection.jedis.JedisConnection;
//import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
//import org.springframework.util.ReflectionUtils;
//import redis.clients.jedis.Jedis;
//
//import javax.annotation.Resource;
//import java.lang.reflect.Field;
//
///**
// * @Description:
// * @ClassName: JedisClient
// * @Package: com.hsyt.pfc.redis
// * @Author: wangze@hsyuntai.com
// * @Date: 2018年9月21日 10:11
// * @Copyright: 版权归 HSYUNTAI 所有
// */
//public class JedisClient {
//
//    private static JedisConnectionFactory jedisConnectionFactory;
//
//    private static Jedis jedis;
//
//    public JedisClient() {
//
//    }
//
//    public JedisClient(JedisConnectionFactory jedisConnectionFactory) {
//        this.setJedisConnectionFactory(jedisConnectionFactory);
//    }
//
//    public static Jedis getJedis() {
//        return jedis;
//    }
//
//    private void setJedisConnectionFactory(JedisConnectionFactory jedisConnectionFactory) {
//        this.jedisConnectionFactory = jedisConnectionFactory;
//        Field jedisField = ReflectionUtils.findField(JedisConnection.class, "jedis");
//        ReflectionUtils.makeAccessible(jedisField);
//        this.jedis = (Jedis) ReflectionUtils.getField(jedisField, this.jedisConnectionFactory.getConnection());
//    }
//
//}
